//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopCoupons, MinishopCouponsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopCouponsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopCouponsResponse>(`/uctoo/minishop_coupons/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopCoupons = async (id: string) => {
  return requestClient.get<MinishopCoupons>(`/uctoo/minishop_coupons/${id}`);
};

export const adductooMinishopCoupons = async (data: Partial<MinishopCoupons>) => {
  return requestClient.post<MinishopCoupons>('/uctoo/minishop_coupons/add', data);
};

export const edituctooMinishopCoupons = async (data: Partial<MinishopCoupons>) => {
  return requestClient.post<MinishopCoupons>('/uctoo/minishop_coupons/edit', data);
};

export const deleteuctooMinishopCoupons = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_coupons/del', { id });
};
